import 'package:fish_redux/fish_redux.dart';
import 'package:hayll_app_village_master/hayll/village_manager/home/village_grid_component/bean/village_grid_response.dart';

//TODO replace with your own action
enum VillageHousePickerAction {
  action,
  refresh,
  picker,
}

enum HousePickerMode{
  BUILD,UNIT,HOUSE,NONE,
}

class VillageHousePickerActionCreator {
  static Action onAction() {
    return const Action(VillageHousePickerAction.action);
  }

  static Action refreshUI() {
    return const Action(VillageHousePickerAction.refresh);
  }

  static Action chooseBuildInfo({VillageBuildGridResult build}) {
    return Action(VillageHousePickerAction.picker,payload:{'mode':HousePickerMode.BUILD,'data':build},);
  }

  static Action chooseUnitInfo({VillageUnitGridResult build}) {
    return Action(VillageHousePickerAction.picker,payload:{'mode':HousePickerMode.UNIT,'data':build},);
  }

  static Action chooseHouseInfo({VillageHouseGridResult build}) {
    return Action(VillageHousePickerAction.picker,payload:{'mode':HousePickerMode.HOUSE,'data':build},);
  }
}
